package es.christiangarcia.android.pokepedia.controller;

import android.content.Context;
import es.christiangarcia.android.pokepedia.business.PokemonBO;

public class Controller {

	private static Controller instance;

	public Controller() {
	}

	public static Controller getInstance() {
		if (instance == null) {
			instance = new Controller();
		}
		return instance;
	}

	// Business
	private PokemonBO pokemonBO;

	public PokemonBO getPokemonBO(Context context) {
		if (pokemonBO == null || !context.equals(pokemonBO.getContext())) {
			this.pokemonBO = new PokemonBO(context);
		}
		return this.pokemonBO;
	}
}
